home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / PROGRAMMING / DESKLIBC / SOURCES.ZIP / DeskLib / !DLSources / Libraries / Icon / c / SetInteger < prev    next >
Text File  |  1995-07-08  |  439b  |  20 lines

  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. #include "DeskLib:Wimp.h"
  5. #include "DeskLib:WimpSWIs.h"
  6. #include "DeskLib:Icon.h"
  7.  
  8.  
  9. extern void Icon_SetInteger(window_handle w, icon_handle i, int value)
  10. /*
  11.  * Sets the given icon's text to hold the number in "value". (and redraws icon)
  12.  * If unable to set the text (incorrect icon type), it returns quietly
  13.  */
  14. {
  15.   char       text[16];
  16.  
  17.   sprintf(text, "%d", value);
  18.   Icon_SetText(w, i, text);
  19. }
  20.